<!--<div class="content-section introduction ">-->
  <!--<div>-->
    <!--<span class="feature-title">巡检管理<span class="gt">&gt;</span>巡检内容管理  </span>-->
  <!--</div>-->
<!--</div>-->
<div class="content-section implementation GridDemo ">
  <div class="mysearch">
    <div class="ui-g">
      <div class=" ui-g-4 ">
        巡检内容名：
        <input pInputText type="text" placeholder="巡检内容名" [(ngModel)]="queryModel.condition.name"/>
        <button pButton type="button"  label="查询"  (click)="suggestInsepectiones()" ></button>
      </div>
      <div class="ui-g-2 ui-g-offset-6 option">
        <button pButton type="button"  label="新增"  (click)="showInspectionContentMask()" ></button>
        <button pButton type="button"  label="删除"  (click)="deleteInspection()" [disabled]="!selectInsepections||selectInsepections.length===0"></button>
      </div>

    </div>

  </div>
 <div class="ui-g">
   <div class="ui-g-12">
     <p-dataTable [value]="inspections"
                  [totalRecords]="totalRecords"  [(selection)]="selectInsepections">
       <p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>
       <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}"></p-column>
       <p-column header="操作">
         <ng-template let-car="rowData" pTemplate="body" let-i="rowIndex">
           <button pButton type="button" label="修改" (click)="updateOption(inspections[i])"></button>
           <button pButton type="button" label="关联巡检内容" (click)="showAssociatedInspectionMask(inspections[i])"></button>
         </ng-template>
       </p-column>
       <ng-template pTemplate="emptymessage">
         当前没有数据
       </ng-template>
     </p-dataTable>
     <p-paginator rows="10" [totalRecords]="totalRecords" [rowsPerPageOptions]="[10,20,30]" (onPageChange)="paginate($event)"></p-paginator>
   </div>
 </div>

</div>
<app-add-or-update-inspection-object-content
  *ngIf="showAddMask"
  (closeAddMask)="closeInspectionMask($event)"
  [state]="state"
  [inspectionNames]="inspectionNames"
  (addDev)="addInsepection($event)"
  (updateDev)="updateInspectionContent($event)"
  [currentInspection]="currentInpection"
>
</app-add-or-update-inspection-object-content>

<app-associated-inspection-object
  *ngIf="showAssciatedMask"
  (closeAssciatedMask)="closeAssociatedInspectionMask($event)">

</app-associated-inspection-object>
